package ibm.cognos.imt.template

import groovy.xml.MarkupBuilder

/**
 * Created with IntelliJ IDEA.
 * User: eric
 * Date: 5/12/14
 * Time: 5:36 PM
 * To change this template use File | Settings | File Templates.
 */
class XmlAttributesTemplate extends AbstractTemplate{
    @Override
    def generateTemplateSpec(MarkupBuilder builder) {
        builder.XMLAttributes{
            XMLAttribute(name:"RS_CreateExtendedDataItems", value:"true", output:"no")
            XMLAttribute(name:"listSeparator", value:",", output:"no")
        }
    }

    @Override
    def getTemplateNode() {
        root = new XmlSlurper().parseText(getSpecStr())
        root
    }
}
